import {INCREMEMTCOUNT,DECREMEMTCOUNT} from '../constant/countConst'
import store from '../store'


export const incrementCount  = (data = 1)=>{
  return {
    type:INCREMEMTCOUNT,
    data
  }
}

export const decrementCount  = (data = 1)=>{
  return {
    type:DECREMEMTCOUNT,
    data
  }
}


export const waitincrementCount  = (data = 1)=>{
  return ()=>{
    setTimeout(()=>{
      store.dispatch({
        type:INCREMEMTCOUNT,
        data
      }) 
    },2000)
  }
}

